﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace ServiceOperater.Helpers
{
    public static class FileHelper
    {
        public static bool isDir(String path)
        {
            // https://stackoverflow.com/questions/439447/net-how-to-check-if-path-is-a-file-and-not-a-directory

            if (!Directory.Exists(path))
            {
                return false;
            }

            bool isDir = (File.GetAttributes(path) & FileAttributes.Directory)
                 == FileAttributes.Directory;

            return isDir;
        }
    }
}
